Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant return in subscribe catch block #3966

Merged

Conversation

Aleexender
Copy link
Contributor

Remove redundant return statement in CorePublisher subscribe method

The explicit return statement in the catch block is unnecessary since the method would naturally terminate after reporting the error through reportThrowInSubscribe.

User Impact

Cleaner code with no behavioral changes for end users. This is purely a maintenance improvement that removes redundant code.

Technical Details

The catch block in the subscribe method contained an unnecessary explicit return statement after Operators.reportThrowInSubscribe(). Since the method would naturally terminate after error reporting, this return statement was redundant and has been removed to improve code clarity.

Related Issues

See #2072

@Aleexender Aleexender requested a review from a team as a code owner January 14, 2025 15:40
@pivotal-cla
Copy link

@Aleexender Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

1 similar comment
@pivotal-cla
Copy link

@Aleexender Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-cla
Copy link

@Aleexender Thank you for signing the Contributor License Agreement!

Copy link
Member

@chemicL chemicL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR! Please note you need to update the license header as per the CI run. Please run ./gradlew spotlessApply locally and update the PR. Thanks!

Remove redundant return statement in CorePublisher subscribe method

The explicit return statement in the catch block is unnecessary since the method
would naturally terminate after reporting the error through reportThrowInSubscribe.

Signed-off-by: Aleexender <[email protected]>
it had a issue when i was using 23. but when i changed to jdk17 it was successfully worked! thanks!

Signed-off-by: Aleexender <[email protected]>
@Aleexender Aleexender force-pushed the cleanup-remove-redundant-return-reactive branch from 9712989 to afaf054 Compare February 3, 2025 03:01
@Aleexender
Copy link
Contributor Author

@chemicL hello! I ran spotlessApply locally! Thank you for your help!

@Aleexender Aleexender requested a review from chemicL February 3, 2025 03:17
@chemicL chemicL merged commit 4677373 into reactor:main Feb 3, 2025
7 checks passed
@chemicL chemicL added the type/chores A task not related to code (build, formatting, process, ...) label Feb 3, 2025
@chemicL chemicL added this to the 3.7.3 milestone Feb 3, 2025
@chemicL
Copy link
Member

chemicL commented Feb 3, 2025

Thanks, @Aleexender :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/chores A task not related to code (build, formatting, process, ...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants